package cn.seimes.zjcc.feign;

import cn.seimes.result.JsonResult;
import cn.seimes.zjcc.dto.MovTicDto;
import cn.seimes.zjcc.fallback.AMTServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-move", path = "movieTicket", contextId = "allTicketService", fallbackFactory = AMTServiceFallbackFactory.class)
public interface AllMoveTickeetService {

    @RequestMapping(value = "/list",method = RequestMethod.GET)
    JsonResult selectList();

    @RequestMapping(value = "/buyTick",method = RequestMethod.POST)
    JsonResult buyTick(@RequestBody MovTicDto dto);

    @RequestMapping(value = "/g/{id}",method = RequestMethod.GET)
    JsonResult geta(@PathVariable("id")Long id);

    @RequestMapping(value = "/fuli",method = RequestMethod.POST)
    JsonResult fuli(@RequestBody Long id);
}
